# 创建python队列，通过列表进行创建
# 队列：先入先出
# 定义isEmpty,enqueue,dequeue,sizi等方法
class Queue:
    def __init__(self):
        self.items = []

    def isEmpty(self):  # 判断是否为空
        return self.items == []

    def enqueue(self,item):  # 加入队列
        self.items.insert(0,item)

    def dequeue(self):  # 删除元素
        return self.items.pop()

    def size(self):
        return len(self.items)

def test():
    q = Queue()
    print(q.size())
    print(q.isEmpty())
    q.enqueue(2)
    print(q.items)
    q.enqueue(3)
    q.enqueue(4)
    print(q.items)

    q.dequeue()
    print(q.items)
    print(q.isEmpty())

if __name__ == '__main__':
    test()